package designPattern.proxy;

public class MyForumProxy implements MyForum {

	private static final int ASSOCIATOR=1;
	private RealMyForum forum=new RealMyForum();
	private int permission;
	public MyForumProxy(int permission){
		this.permission=permission;
	}
	
	@Override
	public void addFile() {
		if(ASSOCIATOR==permission){
			forum.addFile();
		}else{
			System.out.println("you are not a associtor of myForum, please registe");
		}
	}

}
